<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"></meta>
    <title>请假表</title>
    <meta HTTP-EQUIV="Pragma" CONTENT="no-cache"></meta>
    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache"></meta>
    <meta HTTP-EQUIV="Expires" CONTENT="0"></meta>
    <link rel="stylesheet" th:href="@{/static/layui/css/layui.css}" media="all"></link>
    <link rel="stylesheet" th:href="@{/static/layui/css/modules/laydate.css}" media="all"></link>
</head>
<body>
<div style="width: 60%; margin: 0 auto; border: 1px solid  #E6E6E6; padding: 20px;">
    <form class="layui-form layui-form-pane" th:action="@{/leave/process/complete}">
        <input type="hidden" name="taskId" th:value="${taskId}"/>
        <input type="hidden" name="processId" th:value="${processId}"/>
        <input type="hidden" name="id" th:value="${leave.id}"/>

        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input userName" readonly="readonly" th:value="${leave.title}"/>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input userName" readonly="readonly" th:value="${leave.uname}"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">部门</label>
                <div class="layui-input-inline">
                    <input type="text" readonly="readonly" class="layui-input" th:value="${leave.dname}"/>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">开始日期</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" id="test1" disabled="disabled" readonly="readonly"
                           th:value="${#dates.format(leave.sdate, 'yyyy-MM-dd')}"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">结束日期</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" readonly="readonly" name="edate"
                           th:value="${#dates.format(leave.edate,'yyyy-MM-dd')}"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">天数</label>
                <div class="layui-input-inline">
                    <input type="text" name="days" class="layui-input " readonly="readonly" th:value="${leave.days}" id="dayscountshow" ></input>
                </div>
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">请假原因</label>
            <div class="layui-input-block">
                <textarea th:value="${leave.reason}" th:text="${leave.reason}" name="reason" class="layui-textarea"
                          readonly="readonly"></textarea>
            </div>
        </div>


        <div class="layui-form-item" th:each="comment:${comments}">
            <div class="layui-inline">
                <label class="layui-form-label" th:text="${comment.name}"></label>
                <div class="layui-input-inline">
                    <input type="text" autocomplete="off" th:value="${comment.content}" class="layui-input"
                           readonly="readonly" style="color: green"/>
                </div>

            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">审批意见</label>
            <div class="layui-input-block">
                <select name="comment">
                    <option value="approved">同意</option>
                    <option value="rejected">不同意</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <button class="layui-btn" lay-submit="" lay-filter="demo2">提交</button>
        </div>
    </form>

</div>
<script type="text/javascript" th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript">

    layui.use(['form', 'jquery'], function () {


    });


</script>


</body>
</html>